Regexes.php
<?php
return [
'target.VerySimple'=>'OneTwo( (Three))?',
'VerySimple'=>
<<<REG
One
Two ## Am a comment
( ( ## Am another comment
Three ## This seems like a lot of comments
))?
REG,
'target.NestedRef'=>'OneTwo( (Three|Four|Five|Six|Seven|Eight))?',
'NestedRef'=>
<<<REG
One
Two
( (
::nsRef(NumSplit)
))?
REG,
'target.NestedRef.NumSplit'=>'Three|Four|Five|Six|Seven|Eight',
'NestedRef.NumSplit'=>
<<<REG
::nsRef(ThreeFour)
|
::nsRef(FivePlus)
REG,
'target.NestedRef.NumSplit.ThreeFour'=>'Three|Four',
'NestedRef.NumSplit.ThreeFour' =>
<<<REG
Three|Four
REG,
'target.NestedRef.NumSplit.FivePlus'=>'Five|Six|Seven|Eight',
'NestedRef.NumSplit.FivePlus' =>
<<<REG
Five|Six|Seven|Eight
REG,
'target.SimpleCombine'=>'OneTwo( (One|1|one|Two|2|two|Three|3|tree|trees|candy))?',
'SimpleCombine'=>
<<<REG
One
Two
( ( ## Comment for good measure
::combine({{one}}{{two}}{{three}} ;; | )
))?
REG,
'target.SimpleCombine.one'=> 'One|1|one',
'SimpleCombine.one'=> 'One|1|one',
'target.SimpleCombine.two'=> 'Two|2|two',
'SimpleCombine.two'=> 'Two|2|two',
'target.SimpleCombine.three'=> 'Three|3|tree|trees|candy',
'SimpleCombine.three'=> 'Three|3|tree|trees|candy',
'target.SimpleRef'=>'OneTwo( (Three|Four))?',
'SimpleRef'=>
<<<REG
One
Two
( (
::nsRef(ThreeFour)
))?
REG,
'target.SimpleRef.ThreeFour'=>'Three|Four',
'SimpleRef.ThreeFour'=>
<<<REG
Three|Four
REG,
];